<?php

namespace App\Library\Requests\Withdraw;

use App\Library\Requests\Base\BaseDTORequest;
use Illuminate\Validation\Rule;

class WithdrawApplyRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'paymentMethodType' => 'required|string|in:alipay,wechat,unipay',
            'amount' => 'required|numeric|min:' . __('base.withdrawLimit') . '|regex:' . __('com.priceReg'),
        ];
    }

    /**
     * 验证错误信息.
     *
     * @return array
     */
    public function messages(): array
    {
        return [
            'amount.mini' => '提现金额必须大于等于' . __('base.withdrawLimit') . '元',
            'amount.regex' => trans('lang.priceTip'),
        ];
    }
}
